﻿<UserControl x:Class="Skynet.C2SModule.Views.CreateAuthor.CreateAuthorView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:converts="clr-namespace:Infrastructure.WpfClient.Converts;assembly=Infrastructure.WpfClient"
             xmlns:infrules="clr-namespace:Infrastructure.WpfClient.ValidationRules;assembly=Infrastructure.WpfClient"
             mc:Ignorable="d"              
             d:DesignHeight="300" d:DesignWidth="300"
             MinHeight="300" MinWidth="300"
             Loaded="UserControl_Loaded">
    
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition></ColumnDefinition>
                <ColumnDefinition></ColumnDefinition>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"></RowDefinition>
                <RowDefinition Height="Auto"></RowDefinition>
                <RowDefinition Height="Auto"></RowDefinition>
                <RowDefinition Height="*"></RowDefinition>
                
                
            </Grid.RowDefinitions>
            <TextBlock Style="{StaticResource TextBlockStyle}" Grid.Column="0"  Text="First name"></TextBlock>
            <TextBox  Style="{StaticResource TextBoxStyle}" 
                      Grid.Column="1">
                <TextBox.Text>
                    <Binding Path="WorkAuthor.FirstName" ValidatesOnExceptions="True">
                        <Binding.ValidationRules>
                            <infrules:EmptyStringRule></infrules:EmptyStringRule>
                        </Binding.ValidationRules>
                    </Binding>
                </TextBox.Text>                
            </TextBox>
            <TextBlock Style="{StaticResource TextBlockStyle}" Grid.Column="0" Grid.Row="1"  Text="Last Name"></TextBlock>
            <TextBox Style="{StaticResource TextBoxStyle}" 
                     Grid.Column="1" 
                     Grid.Row="1"
                     Text="{Binding WorkAuthor.LastName}"></TextBox>
            
            <TextBlock Style="{StaticResource TextBlockStyle}" Grid.Column="0" Grid.Row="2"  Text="Web Site"></TextBlock>
            <TextBox  Style="{StaticResource TextBoxStyle}" Grid.Column="1" Grid.Row="2"
                      Text="{Binding WorkAuthor.WebSite}">                
            </TextBox>            
            <Button   Name="btnSave" Style="{StaticResource ButtonStyle}" Grid.Column="0" Grid.Row="3" VerticalAlignment="Bottom" Click="btnSave_Click">
            	<Button.Background>
            		<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
            			<GradientStop Color="Black" Offset="0"/>
            			<GradientStop Color="#FFBA5050" Offset="1"/>
            		</LinearGradientBrush>
            	</Button.Background>Save</Button>
            <Button  Name="bntClose" Style="{StaticResource ButtonStyle}" Grid.Column="1" Grid.Row="3" VerticalAlignment="Bottom" Click="bntClose_Click">Close</Button>
            
        </Grid>
</UserControl>
